Convert Database
The iPool Suite Database Editor uses SQLite .db files for power-system simulation databases. Legacy iPool databases are stored in Microsoft Access format (.mdb or .accdb). The Convert Database tool converts these legacy files to the .db format used by the Database Editor.
Opening Convert Database
Click Convert Database in the top toolbar. This button is always enabled — you do not need to have a database open to run a conversion.
Conversion Modes
The modal offers three conversion modes, selected with radio buttons. The mode determines the input type and whether batch processing is available.
Single file
- Label (exact): "Single file"
- Input: One
.mdbor.accdbfile. - Output: One
.dbfile.
The output file must have a .db extension. If you type a path ending in .sqlite or .sqlite3, the converter shows the validation error: "Output file must have a .db extension."
On the web version, you pick a file from your local machine (no server path is shown). The converted .db file downloads automatically when conversion is complete.
Multiple files (Whole folder)
- Label (exact): "Multiple files (Whole folder)"
- Input: A folder containing
.mdbor.accdbfiles. - Output: A folder of
.dbfiles (converted in batch).
On the web version, this mode appears as a disabled option with the note "Multiple files (Whole folder) — Desktop app only."
Region name mapping during MDB conversion
When converting a Microsoft Access .mdb file (using the Single file or Multiple files mode), the converter automatically maps the following region names to their standard database codes if they appear in the source file:
| Source region name | Output region code |
|---|---|
LUZON | CLUZ |
VISAYAS | CVIS |
MINDANAO | CMIN |
This rename cascades to all tables that reference the region: Links (FrReg and ToReg columns), Meters (PID2), Storages (Region), and Units (PID2). The mapping is applied automatically — no configuration is needed.
This mapping runs during the MDB → SQLite conversion only. It does not apply to Regional to Zonal conversions, which work with an existing SQLite database that already uses the standard region codes.
Regional to Zonal
- Label (exact): "Regional to Zonal"
On the web version, this mode appears as a disabled option with the note "Regional to Zonal — Desktop app only."
This mode restructures an existing regional SQLite database into a zonal-format database. Unlike the other two modes, it does not convert from Microsoft Access — the source is already a SQLite file and the output is a modified copy of that file.
Known limitations of this mode — read before converting.
- No progress display. The modal shows no spinner or progress text while converting. The interface will appear frozen; this is expected. Wait for the success message.
- Cancel does not work. Clicking Cancel during conversion changes the button label but does not stop the operation. The conversion runs to completion regardless. Do not rely on Cancel as an abort mechanism for this mode.
- No schema check. The tool will attempt conversion on any SQLite file with the accepted extension. It does not verify that the source is a regional database. Ensure you are selecting the correct source file before proceeding.
Opening Regional to Zonal
- Click Convert Database in the top toolbar.
- In the Convert Database modal, select "Regional to Zonal".
The modal shows two sections: INPUT and OUTPUT.
Selecting the source file
Under INPUT, click "Choose…". A native file picker opens, filtered to .db, .sqlite, and .sqlite3 files. Select the regional database you want to convert.
The source database is chosen in the modal — it does not need to be open in the Database Editor. The source database is not modified. The conversion reads it read-only and writes all changes to a separate output file.
If the source file contains Sites with SiteIDs that are not recognised, conversion is refused before any output file is written. See Error messages below.
Setting the output path
Once you select an input file, the OUTPUT path is automatically populated with a derived filename: the letter Z is appended to the stem before the extension. For example:
SysWESM2606.db→SysWESM2606Z.dbSysWESM2606.sqlite→SysWESM2606Z.sqlite
To use a different path, click "Choose…" under OUTPUT to open the OS save dialog, or type a path directly into the output field. The output file must use a .db, .sqlite, or .sqlite3 extension.
If a file already exists at the output path, a confirmation dialog appears:
- Message: "Output file already exists."
- Detail: Overwrite
"<output path>"? - Confirm button: "Overwrite"
If you confirm, the existing file is overwritten. If you close the dialog without clicking Overwrite, no conversion runs.
Running the conversion
Click "Convert" (enabled when both input and output paths are set). The modal shows no progress during conversion. When conversion completes, the modal body displays:
Zonal database written to: <output path>
What changes in the output file
The following tables are modified in the output file. The source database is not touched.
| Table | Change |
|---|---|
| Regions | All original rows deleted and replaced with 14 fixed zonal rows (01NLUZ, 02METRO, 03SLUZ, 04LEYTE, 05CEBU, 06NEGROS, 07BOHOL, 08PANAY, 09NWMIN, 10LANAO, 11NCMIN, 12NEMIN, 13SEMIN, 14SWMIN). A regional source typically has 3 rows (CLUZ, CVIS, CMIN). |
| Links | All original rows deleted and replaced with 13 fixed zonal interconnection links. A regional source typically has 2 rows. |
| Sites | RegID and GroupID updated for every row to reflect the assigned zone. All other columns (Name, FType, Max, Cap, SRMC, etc.) are left untouched. |
| LinkCoef | All rows deleted (cleared). |
| Units | Not modified. |
Error messages
Errors appear in the red banner above the modal footer.
| Situation | Message |
|---|---|
| No input file selected | "Please select an input file." |
| Input file has wrong extension | "Input file must be a .db, .sqlite, or .sqlite3 file." |
| No output path set | "Please specify an output file path." |
| Output extension not accepted | "Output file must have a .db, .sqlite, or .sqlite3 extension." |
| Input and output paths are the same | "Input and output paths must be different." |
| Input file deleted after selection | "The selected input file no longer exists on disk." |
| Sites contain unrecognised SiteIDs | "regionalToZonal: N unrecognised non-prefixed site[s]: ID1, ID2, …and M more. Conversion refused — fix these SiteIDs before converting." |
When the SiteID error occurs, no output file is written. Fix the SiteIDs in the source database and try again.
From the command line
You can also convert .mdb databases from a batch file, without opening iPool Suite, with iPoolSuite.exe -updatedb -conv. With -o, only that .mdb file is converted and the .db is written next to it. Without -o, every .mdb in your database folder (DirDB in Defaults.csv) is converted (not its subfolders). The .mdb files are kept, and an existing .db of the same name is replaced.
REM One database: -o is the .mdb file. The .db is written next to it.
"C:\Program Files\iPool\iPoolSuite.exe" -updatedb -conv ^
-o "C:\IENERGY\WESM2610\Databases\SysWESM2610.mdb"
REM Every .mdb in your database folder (DirDB in Defaults.csv): leave out -o.
"C:\Program Files\iPool\iPoolSuite.exe" -updatedb -conv
For the full set of options, see iPool Suite Commandline Options. For the complete move from an earlier iPool, see Migrating to iPool Suite.
After Conversion
Once conversion completes, use Open Database in the top toolbar to open the converted .db file and begin editing. From there, all standard Database Editor features are available: browsing the power-system hierarchy, editing records, saving changes, and running updates.
Command-Line Interface (CLI)
The iPoolSuite.exe CLI supports convert-database operations via the -updatedb flag combined with conversion flags. A log file is written beside the database as <name>.cli.log after each run.
Mode 4 — Regional to Zonal
Dry run (check only, no changes written):
iPoolSuite.exe -updatedb -setzones -o <input-database.db>
Convert (write output):
iPoolSuite.exe -updatedb -setzones -o <input-database.db> -s
-o <input-database.db>: the input database to operate on. The output path is auto-derived by appendingZto the stem (for example,SysWESM2606.db→SysWESM2606Z.db). There is no separate output flag.- Without
-s: dry run — checks the regional schema and reports what would happen; writes nothing. - With
-s: performs the conversion and writes the output file.
Mode 5 — MDB to DB Conversion
Single file form:
iPoolSuite.exe -updatedb -conv -o <file.mdb>
-o <file.mdb>: the source.mdbfile. The output.dbis created in the same directory with the same stem. Any existing.dbwith that name is overwritten; the original.mdbis kept.
All-files form:
iPoolSuite.exe -updatedb -conv
- Without
-o: converts all top-level.mdbfiles in theDirDBdirectory (fromDefaults.csv)..accdbfiles and subdirectory contents are ignored.
For full details on each mode, see Convert Database.